package org.grow.pretty.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.Locale;

/**
 * @Author: xwg
 * @CreateDate: 2022/5/30
 */

@Service
public class CodeGeneratorLocalFallback implements CodeGeneratorRService {
    @Value("${server.port}")
    private Integer port = 7777;

    @Override
    public String nextCode(String prefix) {
        return prefix.toLowerCase(Locale.ROOT) + System.currentTimeMillis() + port;
    }
}
